package com.qqs.stock.utils;


import com.qqs.stock.dto.DeductStockOrderDto;
import com.qqs.stock.dto.DeductStockOrderPromise;
import com.qqs.stock.vo.DeductStockOrderVo;

public class DeductStockConvert {

    public static DeductStockOrderPromise convert(DeductStockOrderDto resources){
        DeductStockOrderPromise promise = new DeductStockOrderPromise();
        promise.setOrderId(resources.getOrderId());
        promise.setWarId(resources.getWarId());
        promise.setCount(resources.getCount());
        promise.setTimeStamp(resources.getTimeStamp());
        return promise;
    }

    public static DeductStockOrderVo responseConvert(DeductStockOrderDto resources){
        DeductStockOrderVo target = new DeductStockOrderVo();
        target.setOrderId(resources.getOrderId());
        target.setWarId(resources.getWarId());
        target.setCount(resources.getCount());
        target.setTimeStamp(resources.getTimeStamp());
        return target;
    }

    public static DeductStockOrderVo convert(DeductStockOrderPromise resources){
        DeductStockOrderVo target = new DeductStockOrderVo();
        target.setOrderId(resources.getOrderId());
        target.setWarId(resources.getWarId());
        target.setCount(resources.getCount());
        target.setTimeStamp(resources.getTimeStamp());
        target.setStatus(resources.getStatus());
        target.setMessage(resources.getMessage());
        return target;
    }
}
